<template>
  <div class="page">
    <!--        {{ dictMap }}-->
    <!--        {{ CollectionLabel('MEMBERTYPE', 'month') }}
            {{ CollectionLabel('SEX', '0') }}
            {{ CollectionLabel('COURSETYPE', '01') }}-->
    <!--        {{CollectionData('SEX')}}-->
    <layout-one :form-desc="formDesc" :rules="rules"
                add-url="/sys/account/add" update-url="/sys/account/update"
                url-query-by-id="/sys/account/query/one/"
                url-delete-by-ids="/sys/account/deleteByIds"
                url="/sys/account/query/page"></layout-one>
  </div>
</template>

<script>
// import {mapGetters} from 'vuex'
import expression from '@/utils/expression'
import child from "./child";
import layoutOne from './layoutOne/index'

export default {
  name: "test",
  components:{child,layoutOne},
  computed: {
    /*        ...mapGetters([
                'dictMap'
            ])*/
  },
  data() {
    return {
      value:'',
      res:0,
      isDrawer:false,
      /* 表单 */
      formDesc: {
        account: {
          type: 'input',
          label: '账号'
        },
        password: {
          type: 'password',
          label: '密码'
        },
        confirmPassword: {
          type: 'password',
          label: '密码确认',
          notCol:true,
          notDetail:true,
        }
      },
      // 校检规则
      rules: {
        account: {required: true, message: '账号必填'},
        password: {required: true, message: '密码必填'},
        confirmPassword: {required: true, message: '确认密码必填'},
      }
    }
  },
  created() {
    console.log(this.$root)
    // this.CollectionLabel('SEX','0')
    // this.CollectionLabel('MEMBERTYPE','0')
  },
  methods: {
    calc(){
      // this.res = expression.calcMidExpression(this.value)
      this.res = expression.isValidInequationFormat(this.value)
    }
    /*CollectionLabel(dictCode, value) {
        this.$store.dispatch('dict/CollectionLabel', {dictCode})
        const tmpObj = this.dictMap[dictCode]
        if (!tmpObj) return value
        let tmp = tmpObj.find(item => {
            return item.value === value
        })
        if (!tmp) {
            return value
        }
        return tmp.label
    },
    CollectionData(dictCode){
        this.$store.dispatch('dict/CollectionLabel', {dictCode})
        const tmpObj = this.dictMap[dictCode]
        if (!tmpObj) return []
        return tmpObj
    }*/
  }
}
</script>

<style scoped>

</style>